﻿using Boardgame;
using BoardgameModelViewed;
using BoardgameModel;
using System;
using System.Collections.Generic;


namespace ChessBench
{
    class Pawn03
    {
        // Exercise pawn promotion.
        static void Main ()
        {
            ChessModel game = new ChessModel (4, 0, 6, 6);

            game.Put (new Rook (Player.White), 0, 0);
            game.Put (new Pawn (Player.White), 1, 6);
            game.Put (new Pawn (Player.Black), 6, 1);
            game.Put (new Rook (Player.White), 7, 0);

            Console.WriteLine (game.Board);
            Console.WriteLine ("Turn: {0}", game.PlayerTurn);
            Console.WriteLine ("Status: {0}\n", game.Status);

            game.MakeMove (1, 6, 1, 7);
            Console.WriteLine (game.Plies.ToString ());
            Console.WriteLine (game.Board);
            Console.WriteLine ("Status: {0}\n", game.Status);

            game.MakeMove (6, 1, 6, 0);
            Console.WriteLine (game.Plies.ToString ());
            Console.WriteLine (game.Board);
            Console.WriteLine ("Status: {0}\n", game.Status);

            game.MakeMove (7, 0, 6, 0);
            Console.WriteLine (game.Plies.ToString ());
            Console.WriteLine (game.Board);
            Console.WriteLine ("Status: {0}\n", game.Status);

            game.MakeMove (6, 6, 7, 6);
            Console.WriteLine (game.Plies.ToString ());
            Console.WriteLine (game.Board);
            Console.WriteLine ("Status: {0}\n", game.Status);

            game.MakeMove (0, 0, 0, 5);
            Console.WriteLine (game.Plies.ToString ());
            Console.WriteLine (game.Board);
            Console.WriteLine ("Status={0}\n", game.Status);
        }
    }
}
